package com.enation.app.javashop.framework;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 有效期配置
 *
 * @author zh
 * @version v7.0
 * @date 18/4/13 下午8:19
 * @since v7.0
 */
@Configuration
@ConfigurationProperties(prefix = "javashop")
public class JavashopConfig {
    @Value("${javashop.timeout.accessTokenTimeout:''}")
    private int accessTokenTimeout;
    @Value("${javashop.timeout.refreshTokenTimeout:''}")
    private int refreshTokenTimeout;
    @Value("${javashop.timeout.captchaTimout:''}")
    private int captchaTimout;
    @Value("${javashop.timeout.smscodeTimout:''}")
    private int smscodeTimout;
    @Value("${javashop.mini-program.code-unlimit-position:''}")
    private String codePosition;


    public String getCodePosition() {
        return codePosition;
    }

    public void setCodePosition(String codePosition) {
        this.codePosition = codePosition;
    }

    public int getAccessTokenTimeout() {
        return accessTokenTimeout;
    }

    public void setAccessTokenTimeout(int accessTokenTimeout) {
        this.accessTokenTimeout = accessTokenTimeout;
    }

    public int getRefreshTokenTimeout() {
        return refreshTokenTimeout;
    }

    public void setRefreshTokenTimeout(int refreshTokenTimeout) {
        this.refreshTokenTimeout = refreshTokenTimeout;
    }

    public int getCaptchaTimout() {
        return captchaTimout;
    }

    public void setCaptchaTimout(int captchaTimout) {
        this.captchaTimout = captchaTimout;
    }

    public int getSmscodeTimout() {
        return smscodeTimout;
    }

    public void setSmscodeTimout(int smscodeTimout) {
        this.smscodeTimout = smscodeTimout;
    }

    @Override
    public String toString() {
        return "JavashopConfig{" +
                "accessTokenTimeout=" + accessTokenTimeout +
                ", refreshTokenTimeout=" + refreshTokenTimeout +
                ", captchaTimout=" + captchaTimout +
                ", smscodeTimout=" + smscodeTimout +
                '}';
    }
}
